package com.j180.springboot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;

//该类是springboot项目的运行入口
//该注解的作用就是标记该应用是一个springBoot的应用
//@SpringBootApplication 它其实一个组成的的注解
/**
 * 由这三个注解组成
 * @SpringBootConfiguration   @Configuration  该类是一个配置类
 * @EnableAutoConfiguration  它的作用就是读取自动配置
 *                            读取 META-INF/spring.factories中的配置
 *@ComponentScan 扫描包  默认springboot扫描的包为主入口所在的包及其子包
 *
 *
 */

@SpringBootApplication
/*@SpringBootConfiguration
@EnableAutoConfiguration
@ComponentScan*/
@ComponentScan(basePackages={"com.j180.springboot","mycontroller"})
public class Springboot1Application {

	public static void main(String[] args) {

		SpringApplication.run(Springboot1Application.class, args);
	}

}
